/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * pnlListSellProduct.java
 *
 * Created on 16 ม.ค. 2553, 14:18:43
 */

package store.frontend;

/**
 *
 * @author Administrator
 */
public class PnlListSellProduct extends javax.swing.JPanel {

    /** Creates new form pnlListSellProduct */
    public PnlListSellProduct() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlListSellProduct = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        btnListSellProducDel = new javax.swing.JButton();
        btnListSellProducSave = new javax.swing.JButton();
        btnListSellProducAdd = new javax.swing.JButton();
        btnListSellProducEdit = new javax.swing.JButton();
        btnListSellProducCancel = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        txfListSellProducIDProduct = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        btnListSellProducOK = new javax.swing.JButton();
        jLabel5 = new javax.swing.JLabel();
        txfListSellProducIDCustomer = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        txfListSellProducIDStaff = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblListSellProduct = new javax.swing.JTable();

        setMaximumSize(new java.awt.Dimension(700, 500));
        setMinimumSize(new java.awt.Dimension(700, 500));
        setPreferredSize(new java.awt.Dimension(700, 500));

        pnlListSellProduct.setBackground(new java.awt.Color(255, 204, 102));
        pnlListSellProduct.setMaximumSize(new java.awt.Dimension(700, 80));
        pnlListSellProduct.setPreferredSize(new java.awt.Dimension(700, 80));

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 16));
        jLabel1.setText("ขายสินค้า");

        btnListSellProducDel.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnListSellProducDel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/del_30x30.gif"))); // NOI18N
        btnListSellProducDel.setPreferredSize(new java.awt.Dimension(40, 40));

        btnListSellProducSave.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnListSellProducSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/save_30x30.gif"))); // NOI18N
        btnListSellProducSave.setPreferredSize(new java.awt.Dimension(40, 40));

        btnListSellProducAdd.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnListSellProducAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/add_30x30.gif"))); // NOI18N
        btnListSellProducAdd.setMaximumSize(new java.awt.Dimension(71, 25));
        btnListSellProducAdd.setMinimumSize(new java.awt.Dimension(71, 25));
        btnListSellProducAdd.setPreferredSize(new java.awt.Dimension(40, 40));

        btnListSellProducEdit.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnListSellProducEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/edit1_30x30.gif"))); // NOI18N
        btnListSellProducEdit.setMaximumSize(new java.awt.Dimension(71, 25));
        btnListSellProducEdit.setMinimumSize(new java.awt.Dimension(71, 25));
        btnListSellProducEdit.setPreferredSize(new java.awt.Dimension(40, 40));

        btnListSellProducCancel.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnListSellProducCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/cancel_30x30.gif"))); // NOI18N
        btnListSellProducCancel.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout pnlListSellProductLayout = new javax.swing.GroupLayout(pnlListSellProduct);
        pnlListSellProduct.setLayout(pnlListSellProductLayout);
        pnlListSellProductLayout.setHorizontalGroup(
            pnlListSellProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlListSellProductLayout.createSequentialGroup()
                .addGroup(pnlListSellProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlListSellProductLayout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(jLabel1))
                    .addGroup(pnlListSellProductLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(btnListSellProducSave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(btnListSellProducAdd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnListSellProducEdit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnListSellProducDel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnListSellProducCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(272, 272, 272))
        );
        pnlListSellProductLayout.setVerticalGroup(
            pnlListSellProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlListSellProductLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlListSellProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnListSellProducSave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnListSellProducAdd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnListSellProducEdit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnListSellProducDel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnListSellProducCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel2.setMaximumSize(new java.awt.Dimension(700, 300));
        jPanel2.setPreferredSize(new java.awt.Dimension(700, 300));

        txfListSellProducIDProduct.setFont(new java.awt.Font("Tahoma", 0, 12));
        txfListSellProducIDProduct.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txfListSellProducIDProductActionPerformed(evt);
            }
        });

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel3.setText("รหัสสินค้า :");

        btnListSellProducOK.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnListSellProducOK.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/ok_30x30.gif"))); // NOI18N
        btnListSellProducOK.setMaximumSize(new java.awt.Dimension(71, 25));
        btnListSellProducOK.setMinimumSize(new java.awt.Dimension(71, 25));
        btnListSellProducOK.setPreferredSize(new java.awt.Dimension(40, 40));

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel5.setText("รหัสลูกค้า :");

        txfListSellProducIDCustomer.setFont(new java.awt.Font("Tahoma", 0, 12));
        txfListSellProducIDCustomer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txfListSellProducIDCustomerActionPerformed(evt);
            }
        });

        jLabel4.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel4.setText("รหัสพนักงาน :");

        txfListSellProducIDStaff.setFont(new java.awt.Font("Tahoma", 0, 12));
        txfListSellProducIDStaff.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txfListSellProducIDStaffActionPerformed(evt);
            }
        });

        tblListSellProduct.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        tblListSellProduct.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "รหัสสินค้า", "ชื่อสินค้า", "ราคา/หน่วย", "จำนวน", "รวมเงิน"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Float.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, true
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tblListSellProduct);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel4)
                            .addComponent(jLabel3)
                            .addComponent(jLabel5))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txfListSellProducIDProduct, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txfListSellProducIDCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(btnListSellProducOK, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(txfListSellProducIDStaff, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 700, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(txfListSellProducIDStaff, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txfListSellProducIDCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txfListSellProducIDProduct, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3)))
                    .addComponent(btnListSellProducOK, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 284, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlListSellProduct, javax.swing.GroupLayout.DEFAULT_SIZE, 712, Short.MAX_VALUE)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 712, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(pnlListSellProduct, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 345, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(69, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void txfListSellProducIDProductActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txfListSellProducIDProductActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txfListSellProducIDProductActionPerformed

    private void txfListSellProducIDStaffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txfListSellProducIDStaffActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txfListSellProducIDStaffActionPerformed

    private void txfListSellProducIDCustomerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txfListSellProducIDCustomerActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txfListSellProducIDCustomerActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnListSellProducAdd;
    private javax.swing.JButton btnListSellProducCancel;
    private javax.swing.JButton btnListSellProducDel;
    private javax.swing.JButton btnListSellProducEdit;
    private javax.swing.JButton btnListSellProducOK;
    private javax.swing.JButton btnListSellProducSave;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel pnlListSellProduct;
    private javax.swing.JTable tblListSellProduct;
    private javax.swing.JTextField txfListSellProducIDCustomer;
    private javax.swing.JTextField txfListSellProducIDProduct;
    private javax.swing.JTextField txfListSellProducIDStaff;
    // End of variables declaration//GEN-END:variables

}
